Imports pfcls


Public Class Form1

    Dim asyncConnection As IpfcAsyncConnection = Nothing

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        Dim cAC As CCpfcAsyncConnection
        cAC = New CCpfcAsyncConnection
        asyncConnection = cAC.Start("C:\\Program Files\\proeWildfire 4.0\\bin\\proe1.bat", ".")

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
        asyncConnection.End()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click

        OpenFileDialog1.ShowDialog()

    End Sub

    Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
        Dim session As IpfcBaseSession
        session = asyncConnection.Session
        Dim descModel As IpfcModelDescriptor
        Dim model As IpfcModel
        Dim name As String
        name = OpenFileDialog1.FileName()
        name.Replace("\\", "\\\\")

        descModel = (New CCpfcModelDescriptor).Create(EpfcModelType.EpfcMDL_PART, name, Nothing)

        model = session.RetrieveModel(descModel)
        session.CreateModelWindow(model)
        model.Display()

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        OpenFileDialog2.ShowDialog()
    End Sub

    Private Sub OpenFileDialog2_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog2.FileOk
        Dim wenjianming As String
        wenjianming = OpenFileDialog2.FileName
        wenjianming.Replace("\\", "\\\\")
        Dim test As New comappLib.paraextract
        test.connparam(wenjianming)
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

    End Sub
End Class
